package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.Area;
import com.itgaoshu.hospitalproject.bean.Drugdictionary;
import com.itgaoshu.hospitalproject.bean.Type;
import com.itgaoshu.hospitalproject.bean.Unit;
import com.itgaoshu.hospitalproject.mapper.DrugdictionaryMapper;
import com.itgaoshu.hospitalproject.service.DrugdictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class DrugdictionaryServiceImpl implements DrugdictionaryService{
    @Autowired
    private DrugdictionaryMapper drugdictionaryMapper;

    @Override
    public List<Drugdictionary> findAllSdrugdictionary(Drugdictionary drugdictionary) {
        return drugdictionaryMapper.findAllSdrugdictionary(drugdictionary);
    }

    @Override
    public int addSdrugdictionary(Drugdictionary drugdictionary) {
        return drugdictionaryMapper.addSdrugdictionary(drugdictionary);
    }

    @Override
    public List<Area> findAllArea() {
        return drugdictionaryMapper.findAllArea();
    }

    @Override
    public List<Unit> findAllUnit() {
        return drugdictionaryMapper.findAllUnit();
    }

    @Override
    public List<Type> findAllType() {
        return drugdictionaryMapper.findAllType();
    }

    @Override
    public int deleteSdrugdictionary(int drugId) {
        return drugdictionaryMapper.deleteSdrugdictionary(drugId);
    }

    @Override
    public int editSdrugdictionary(Drugdictionary drugdictionary) {
        return drugdictionaryMapper.editSdrugdictionary(drugdictionary);
    }
}
